﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    /// <summary>
    /// 供应商信息表实体类
    /// </summary>
    public class Supplier
    {
        public string SupplierID { get; set; }  //供应商编号
        public string SupplierName { get; set; }//供应商
        public Contact ContactInfo { get; set; }//联系方式

        public Supplier() { }
        public Supplier(string supplierID,string supplierName)
        {
            this.SupplierID   = supplierID;
            this.SupplierName = supplierName;
        }
        public Supplier(Supplier s, Contact c = null)
        {
            this.SupplierID = s.SupplierID;
            this.SupplierName = s.SupplierName;
            if (c != null)
            {
                this.ContactInfo              = new Contact();
                this.ContactInfo.SpellingCode = c.SpellingCode;
                this.ContactInfo.Address      = c.Address;
                this.ContactInfo.ZipCode      = c.ZipCode;
                this.ContactInfo.Tel          = c.Tel;
                this.ContactInfo.Fax          = c.Fax;
                this.ContactInfo.BankName     = c.BankName;
                this.ContactInfo.BankAccount  = c.BankAccount;
                this.ContactInfo.Contacter    = c.Contacter;
                this.ContactInfo.Email        = c.Email;
            }
        }
    }
}
